<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta charset="utf-8" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <meta name="author" content="" />
  <meta name="renderer" content="webkit" />
  <title></title>
  <link href="css/daterangepicker.min.css" rel="stylesheet" />
  <link rel="stylesheet" href="css/main.css" />
	<link rel="stylesheet" href="enterpriseCommon/common.css">
  <link rel="shortcut icon" href="favicon.ico" />
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
  <!--[if lt IE 9]>
      <script src="js/html5shiv.min.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
  <script src="js/vue.js"></script>
</head>

<body>
  <div id="app" >
    <header></header>
    <div class="header-space"></div>
    <template v-cloak>

      <section v-if="status === 0" class="section531">
        <div class="content">
          <div class="step"><img src="images/icon531-1.png" alt="" /></div>
          <div class="result">
            <img src="images/icon532.png" alt="" class="icon" />
            <h3>您已提交成功</h3>
            <p>24小时内审核完成，请耐心等待审核结果</p>
          </div>
        </div>
      </section>
      <section v-else-if="status === 1" class="section531">
        <div class="content">
          <div class="step"><img src="images/icon531-1.png" alt="" /></div>
          <div class="result">
            <img src="images/icon532.png" alt="" class="icon" />
            <h3 class="">审核通过</h3>
            <div class="operate">
              <a href="./50.html" class="btn">首页</a>
            </div>
          </div>
        </div>
      </section>
      <section v-else-if="status === 2" class="section531">
        <div class="content">
          <div class="step"><img src="images/icon531-1.png" alt="" /></div>
          <div class="result">
            <img src="images/icon533.png" alt="" class="icon" />
            <h3 class="orange">审核失败</h3>
            <p>很抱歉通知您，您提交到申请未通过平台审核，原因如下：</p>
            <div class="info">{{info}}</div>
            <div class="operate">
              <a href="./52.html" class="btn">修改</a>
            </div>
          </div>
        </div>
      </section>
    </template>
    <footer></footer>
  </div>
  <script src="js/jquery.min.js"></script>
  <script src="js/slide.min.js"></script>
  <script src="js/polyfill.min.js"></script>
  <script src="js/jquery.nicescroll3.7.6.min.js"></script>
  <script src="js/main.js"></script>
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <script src="js/request.js"></script>
  <script>
    $(function() {
      $("header").load("./enterpriseCommon/header.html");
      $("footer").load("./enterpriseCommon/footer.html");
    })
  </script>
  <script>
    new Vue({
      el: "#app",
      data: {
        isLoading: false,
        status: 1, // 1:通过 2:拒绝
        info: '填写信息有误。请重新填写'
      },
      created: function() {
        var that = this;
        this.isLoading = true
        this.getUserInfo(function(userRes) {
          console.log(userRes);
          var id = userRes.data.enterprise_id
          request('enterprise/qualification/' + id, 'GET', {
            id: id
          }, function success(res) {
            that.status = +res.data.status
            that.isLoading = false
          }, function fail() {

          })
        })
      },
      methods: {

        getUserInfo: function(callback) {
          var self = this;
          request(
            "enterprise/company/employee_base_info",
            "GET",
            "",
            function(res) {
              callback(res)
            },
            function(err) {
              self.$message.error(err.message);
            }
          );
        },
      }
    });

  </script>
</body>

</html>
